﻿<UserControl x:Class="ModernAudioTagger.Pages.Batch"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:vm="clr-namespace:ModernAudioTagger.ViewModel"
             xmlns:content="clr-namespace:ModernAudioTagger.Content"
             xmlns:provider="clr-namespace:ModernAudioTagger.Provider"
             xmlns:view="clr-namespace:ModernAudioTagger.View"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
             mc:Ignorable="d" 
             d:DesignHeight="400" d:DesignWidth="600">

    <UserControl.DataContext>
        <!--<vm:BatchHelperViewModel />-->
        <Binding Source="{x:Static provider:ViewModelLocator.Instance}" Path="BatchHelperVM" />
    </UserControl.DataContext>

    <DockPanel>
        <Grid DockPanel.Dock="Bottom">

            <!-- content root for additional spacing -->
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <DockPanel>

                    <Grid DockPanel.Dock="Top" Margin="{StaticResource DefaultMargin}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition></ColumnDefinition>
                            <ColumnDefinition></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Margin="{StaticResource DefaultMargin}">
                            <mui:ModernButton Command="{x:Static view:ViewCommands.CopyTextToClipboard}" CommandParameter="{Binding Preview}" ToolTip="Copy command line into clipboard" EllipseDiameter="24" IconWidth="16" IconHeight="16" IconData="{StaticResource copyPathData}" />
                            <!--
                            <mui:ModernButton Command="{Binding UpdatePreviewCommand}" ToolTip="Generate command line" EllipseDiameter="24" IconWidth="16" IconHeight="16" IconData="{StaticResource flashPathData}" />                        
                            <mui:ModernButton ToolTip="Open working folder" EllipseDiameter="24" IconWidth="16" IconHeight="16" IconData="{StaticResource openFolderPathData}" Command="{Binding Source={x:Static provider:ViewModelLocator.Instance}, Path=LocalSystemVM.OpenFolderDialogCommand}"  />
                            <mui:ModernButton ToolTip="Refresh folder content" EllipseDiameter="24" IconWidth="16" IconHeight="16" IconData="{StaticResource refreshPathData}" Command="{Binding Source={x:Static provider:ViewModelLocator.Instance}, Path=LocalSystemVM.RefreshFilelistCommand}" Margin="{StaticResource DefaultLeftMargin}"  />
                            <Line Y1="0" Y2="24" Stroke="{DynamicResource SeparatorBackground}" Margin="{StaticResource LineMenuSeparator}"></Line>
                            <mui:ModernButton ToolTip="Rename target" EllipseDiameter="24" IconWidth="16" IconHeight="16" IconData="{StaticResource pencilPathData}" Command="{Binding RenameObjectCommand}" />
                            -->
                        </StackPanel>
                        <StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right">
                            <mui:ModernButton 
                                ToolTip="Help online"
                                Command="{x:Static view:ViewCommands.OpenUrl}" 
                                CommandParameter="{StaticResource doc_batch}"
                                EllipseDiameter="24" IconWidth="16" IconHeight="16"                           
                                HorizontalAlignment="Right"
                                Margin="{StaticResource DefaultRightMargin}"
                                IconData="{StaticResource helpPathData}"
                            />
                        </StackPanel>
                    </Grid>
                    

                    <ScrollViewer>
                        <content:ContentBatchHelper />
                    </ScrollViewer>
                </DockPanel>

            </Grid>
        </Grid>
    </DockPanel>

    <!--<i:Interaction.Triggers>
        <i:EventTrigger EventName="Loaded">
            <i:InvokeCommandAction Command="{Binding StartGenerateCommandLineCommand}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>-->

</UserControl>
